<%@page contentType="text/html; charset=utf-8"%>
<%@ include file="/include/head.jsp"%>

<div class="pageHeader">
	<form rel="pagerForm" id="searchForm" onsubmit="return navTabSearch(this);" action="common/labelPager.do" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td>
						标签类型:
				    	<select name="map.approveStatus">
							<option value="">请选择</option>
						<c:forEach items="${Dict.getList('APPROVE_STATUS')}"  var="item" varStatus="varStatus">
							<option value="${item.KEY}"  ${pager.scMap.approveStatus==item.KEY?'selected':''}>${item.VALUE}</option>
				    	</c:forEach>
				    	</select>
						标签内容:
						<input size="15" type="text" name="map.label_L" value="${pager.scMap.label_L}">
		      		</td>
				</tr>
			</table>
		 		<div class="subBar">
				<ul>
					<li><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></li>
				</ul>
			</div>
		</div>
	</form>
</div>

<div class="panelBar">
	<ul class="toolBar">
		<li><a class="add" target="navTab" href="common/toLabelManager.do?ACTION=MODIFY&TODO=ADD&funId=${funId}"><span>添加</span></a></li>
		<li><a class="icon" href='javascript:exportExcel($("#searchForm",navTab.getCurrentPanel()), $("#pagerForm",navTab.getCurrentPanel()))' title="确实要导出这些记录吗?"><span>导出EXCEL</span></a></li>
		<li><a class="icon" href="javascript:$.printBox('w_list_print')"><span>打印</span></a></li>
	</ul>
</div>
 
<div>
	<table class="table" width="100%" targetType="navTab" asc="asc" desc="desc" layoutH="137">
		<thead>
			<tr>
				<th width="30">No.</th>
				<th width="75" orderField="entityType" <c:if test='${pager.orderField=="entityType"}'>class="${param.orderDirection}"</c:if> >标签对象</th>
				<th width="75" orderField="labelType" <c:if test='${pager.orderField=="labelType"}'>class="${param.orderDirection}"</c:if> >标签类型</th>
				<th orderField="label" <c:if test='${pager.orderField=="label"}'>class="${param.orderDirection}"</c:if> >标签内容</th>
				<th width="75" orderField="totalCnt" <c:if test='${pager.orderField=="totalCnt"}'>class="${param.orderDirection}"</c:if> >总次数</th>
				<th width="60" orderField="usedCnt" <c:if test='${pager.orderField=="usedCnt"}'>class="${param.orderDirection}"</c:if> >引用次数</th>
				<th width="60" orderField="adjustCnt" <c:if test='${pager.orderField=="adjustCnt"}'>class="${param.orderDirection}"</c:if> >人为调整</th>
				<th width="100">操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${pager.resultList}" var="item" varStatus="varStatus">
				<tr target="sid_${entity }" rel="${item.id}">
					<td align="right">${varStatus.count}</td>					
					<td>${item.entityType}</td>
					<td>${item.labelType}</td>		
					<td>${item.label}</td>		
					<td align="right">${item.totalCnt}</td>
					<td align="right">${item.usedCnt}</td>
					<td align="right">${item.adjustCnt}</td>
					<td>
					    <a title="编辑标签" target="navTab" href="common/toLabelManager.do?entityType=${item.entityType}&labelType=${item.labelType}&label=${item.label}&ACTION=MODIFY&TODO=EDIT&funId=${funId}" rel="cyzjEditor">编辑</a>&nbsp;&nbsp;
						<a title="删除标签" target="ajaxTODO" href="common/removeLabels.do?entityType=${item.entityType}&labelType=${item.labelType}&label=${item.label}&ACTION=VIEW&TODO=APPROVE&funId=${funId}" rel="cyzjEditor">删除</a>&nbsp;&nbsp;
					</td>
				</tr>
			</c:forEach>
		</tbody>
	</table>
</div>
<form action="common/toLabelEditor.do" id="labelEditorForm">
<input type="hidden" name="entityType" id="entityType">
<input type="hidden" name="labelType" id="labelType">
<input type="hidden" name="label" id="label">
</form>
<jsp:include page="../include/pagerDiv.jsp" flush="true" />